function Sequence1211View(jqInput) {
	this.jqInput = jqInput;
}

Sequence1211View.prototype.init = function(controller) {
	this.controller = controller;
	var view = this;
	this.jqInput.change(function() {
		var solved = view.controller.check('312211', this.value);
		var input = $(this);
		if (solved) {
			new AEnigmatesStorage("1211").solved();
			input.unbind();
			input.attr('readonly', true);
			alert('Solved!');
		} else {
			input.addClass('wrong');
			setTimeout(function() {
				input.removeClass('wrong');
				input.val('');
			}, 1000);
		}
	});
};
